///*
//package com.leyou.item.web;
//
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.multipart.MultipartFile;
//
//import java.io.File;
//import java.io.IOException;
//
//@RestController
//@RequestMapping("/upload")
//public class UploadController {
//    @PostMapping
//    public ResponseEntity<String> upload(
//            @RequestParam("file")MultipartFile file) throws IOException {
//        String dir="F:/njinx/nginx-1.12.2/html/upload";
//        String fileName=file.getOriginalFilename();
//        file.transferTo(new File(dir,fileName));
//        return  ResponseEntity.ok("http://image.leyou.com/upload/"+fileName);
//    }
//}
//*/
